<link rel='stylesheet' href='${rc.getContextPath()}/manage/styles/colorPicker/spectrum.css' />
   <style>
dl.defectLookup span.error
{
    position:absolute !important;
    left:257px;
}

.sp-dd {
    background: url("${rc.getContextPath()}/manage/styles/dwz/themes/default/images/button/imgX.png");
    background-position: -163px -1px;
    height: 18px;
    width: 16px;
    position: absolute;
    right: 0px;
    top: 0px;
    border: 1px solid #D9DFE5;
}

.sp-replacer {
    padding: 0px;
    border: 0px !important;
    background: #EDF4F5 none repeat scroll 0% 0%;
    width: 146px;
    height: 24px;
    position: relative;
}

.sp-replacer.sp-active {
    border-color: #289BE5;
}

.sp-container, .sp-palette-container {
    border-color: #BDD7E7;
}

.sp-input {
    border: 1px solid #D9DFE5;
}

.sp-preview {
    width: 127px;
    height: 22px;
    border: 1px solid #D9DFE5;
    margin: 0px;
}

</style>

<div class="pageContent">
    <form method="post"
        action="${rc.getContextPath()}/manage/andonAccount/saveAndonAccount"
        class="pageForm required-validate"
        onsubmit="return validateCallback(this,dialogAjaxDone);">
        <div class="pageFormContent" >
            <input type="hidden" name="navTabId" value="${navTabId!''}">
           
            <fieldset>
                 <dl>
                    <dt style="width: 120px;"><@label key="andonCode.C,colon">安灯编号：</@label></dt>
                    <dd>
                        <input name="andonCode" size="22" type="text" maxlength="20"  class="required  alphanumeric toUp"
                        value="${andonAccount.andonCode!''}" 
                remote="${rc.getContextPath()}/manage/andonAccount/validateAndonAccount" 
                warn="<@label key='andonCodeExist.M'>安灯编号已存在</@label>" />
                    </dd>
                </dl>
               
               <dl>
                    <dt style="width: 120px;"><@label key="andonText.C,colon">安灯描述：</@label></dt>
                    <dd>
                        <input name="andonText" size="22" type="text" maxlength="60"  
                        value="${andonAccount.andonText!''}" />
                    </dd>
                </dl>
                
                <dl class="notnormal">
            <dt style="width: 120px;"><@label key='materialCode.C,colon'>物料编号：</@label></dt>
            <dd>
                <input class="required look" id="materialLookup.materialCode" name="materialCode" type="text" postField="materialCode" 
                suggestFields="materialCode,materialText" 
                suggestUrl="${rc.getContextPath()}/manage/material/componentSuggest" lookupGroup="materialLookup" 
                 
                remote="${rc.getContextPath()}/manage/material/validateMaterial" 
                warn="<@label key='materialCodeNotExists.M'>物料编号不存在</@label>" 
                />
                <a class="btnLook" href="${rc.getContextPath()}/manage/material/componentLookUp?lookupType=radio" 
                rel="materialLookup_dialog" 
                title="<@label key='select.C,materialCode.C'>选择物料</@label>" lookupGroup="materialLookup" ></a>
            </dd>
        </dl>
        <dl>
            <dt style="width: 120px;"><@label key='materialText.C,colon'>物料名称：</@label></dt>
            <dd><input id="materialLookup.materialText" name="materialText" type="text" readonly="readonly"/></dd>
        </dl>
        
                <dl>
                     <dt style="width: 120px;"><@label key="andonTypeText.C,colon">物流类别：</@label></dt> 
                     <dd><select style="width:147px;" name="andonTypeCode">                        
                       <#if andonTypes??> 
	                       <#list andonTypes as andonType>
					 	     <option value="${andonType.andonTypeCode!''}">${andonType.typeText!''}</option> 
					 	   </#list> 
				 	   </#if>
       				</select>  
      				</dd>
                </dl>
                                           
                <dl>
                    <dt style="width: 120px;"><@label key="memo.C,colon">备注：</@label></dt>
                    <dd>
                        <input name="memo" size="22" type="text" maxlength="60"  
                        value="${andonAccount.memo!''}" />
                    </dd>
                </dl>
                             
                <dl class="defectLookup">
                    <dt style="width: 120px;"><@label key="status.C,colon">状态：</@label></dt>
                    <dd>
                    	<select name="lockFlag">
                            <option value="0" <#if andonType.lockFlag?? && andonType.lockFlag == 0>selected="selected"</#if>><@label key="enable.C">启用</@label></option>
                            <option value="1" <#if andonType.lockFlag?? && andonType.lockFlag == 1>selected="selected"</#if>><@label key="disable.C">禁用</@label></option>
                        </select>
                    </dd>
                </dl>
                
                <dl>
                    
                </dl>          
                   
                <dl style="height:40px;">
                    <dt style="width: 120px;"><@label key="normalColor.C,colon">正常状态颜色：</@label></dt>
                    <dd><input type='text' id="normalColor" name="normalColor" 
                    value="${andonAccount.normalColor!'#00EC00'}"/></dd>
                </dl>
                <dl style="height:40px;">
                    <dt style="width: 120px;"><@label key="touchColor.C,colon">触发状态颜色：</@label></dt>
                    <dd><input type='text' id="touchColor" name="touchColor" 
                    value="${andonAccount.touchColor!'#FF0000'}"/></dd>
                </dl>                
            </fieldset>            
        </div>
       
        <div class="formBar">
            <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit"><@label key="save.B">保存</@label></button>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="buttonActiveGrey">
                            <div class="buttonContent">
                                    <button type="button" class="close" ><@label key="cancel.B">取消</@label></button>
                            </div>
                        </div>
                    </li>
            </ul>
        </div>
    </form>
</div>
<script>
$(function(){
    var dialog= $.pdialog.getCurrent();
    var normalColor=$("#normalColor", dialog);
    var touchColor=$("#touchColor", dialog);
    var colorOption={
            chooseText: "<@label key='select.C'>选择</@label>",
            cancelText: "<@label key='cancel.B'>取消</@label>",
            showInput: true,
            preferredFormat: "hex",
            showInput: true,
            showPalette: true,
            palette: [
                ["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],
                ["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],
                ["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],
                ["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],
                ["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],
                ["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],
                ["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],
                ["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
            ]
        };
     
    normalColor.spectrum(colorOption);
    touchColor.spectrum(colorOption);
    $('.sp-dd', dialog).empty();
});


</script>
